#pragma once

#include "fxcc/core/audio/common/pch.h"

namespace fxcc
{
    namespace audio
    {

        namespace common {

            struct FXCC_API OggFile
            {
                using Desc = std::string;

                std::string m_Path;

                Desc m_Desc;

                std::vector<int16_t> m_PCMData;

                int m_Channels = 0;

                int m_SampleRate = 0;

                int m_SampleCount = 0;

                bool m_Available = false;

                OggFile(const std::string& path);

                ~OggFile();

                void Load();

                bool Init();

                int GetAlFormat();

                int16_t* Data()
                {
                    return m_Available ? m_PCMData.data() : nullptr;
                }

                size_t DataSize();

                int SampleRate();

                int Channels();
            };
        }
    }
}
